package kshell.cn.msg.service.impl;

import kshell.cn.msg.service.ConsumerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

import java.util.function.Consumer;

/**
 * 消费者实现
 */
@Service
@Slf4j
public class ConsumerServiceImpl implements ConsumerService {
    @Bean
    Consumer<String> sink() {
        return message -> {
            log.info("消费者监听到消息:{}", message);
        };
    }
}
